﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Dinamico.Models
{   
    /// <summary>
    /// Model representing the Article in the User Session Basket-List.
    /// </summary>
    public class BasketArticleModel
    {
        public BasketArticleModel(ArticleInputModel article)
        {
            //this.ArticleId = article.ArticleId;            
            //this.SizeName = article.SizeName;
            this.Quantity = article.Quantity;
            this.Id = article.Id;
        }
        
        public string BasketArticleId { get; private set; }

        public void SetBasketArticleId(string newBasketArticleId)
        {
            if (String.IsNullOrEmpty(BasketArticleId))
            {
                this.BasketArticleId = newBasketArticleId;
            }
            else
            {
                throw new NotSupportedException("BasketArticleId already set.");
            }
        }


        public string  Id { get; set; }        
        public string SizeName { get; set; }
        public double Quantity {get; set;}
    }
}